<%@ page language="java" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"    uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

 <form class="form-horizontal ms-form modal-search-form" id ="transport-supplier" role="form" method="POST" action="${ctx.host}/admin-users/${user.id}/organizations" data-validate="true">
   
   <input type="hidden" name="_method" value="PATCH">
   
   <p class="hint-message" style="margin: 20px 0 20px 0;"><span style="color:#ce082b">提醒</span>：以下为该用户可操作运输主业务的数据权限，可修改</p>
   <table class="table table-hover ms-table">
     <thead>
       <tr>
         <th>选中</th>
         <th>专属供应商名称</th>
         <th>代码</th>
       </tr>
     </thead>
       <tbody>
         <c:forEach items="${organizations}" var="organization">
             <tr>
               <td><input type="checkbox" name="organizations" value="${organization.id}" ${organization.belongs(userOrganizations) ? 'checked' : ''}/></td>
               <td>${organization.name}</td>
               <td>${organization.code}</td>
             </tr>
         </c:forEach>
       </tbody>
   </table>
 
   <div class="form-group ms-form-group">
     <div class="col-xs-6 col-xs-offset-3 ms-operation-group top-margin-20 text-center">
       <div class="col-xs-5">
         <button type="button" onclick="window.history.back();" class="btn btn-block btn-default btn-remove">取消</button>
       </div>
       <div class="col-xs-5">
         <button type="submit" class="btn btn-block btn-primary">保存</button>
       </div>
     </div>
   </div>
   
</form>
     
